package com.ywy.core.constants;

/**
 * 常量定义
 */
public class SystemConstants {
    public static final Integer ZERO = 0;
    public static final String ZERO_STR = "0";

    public static final Integer LENGTH_5 = 5;
    public static final Integer LENGTH_10 = 10;
    public static final Integer LENGTH_15 = 15;
    public static final Integer LENGTH_20 = 20;
    public static final Integer LENGTH_30 = 30;
    public static final Integer LENGTH_50 = 50;
    public static final Integer LENGTH_150 = 150;

    public static final Long MB = 1024 * 1024L;

    /**
     * 用户头像目录
     */
    public static final String USER_AVATAR_FOLDER = "avatar/";

    /**
     * 用户头像后缀名
     */
    public static final String USER_AVATAR_SUFFIX = ".jpg";

    /**
     * 视频缩略图后缀名
     */
    public static final String VIDEO_COVER_SUFFIX = ".png";

    /**
     * 文件临时目录
     */
    public static final String FILE_TEMP_FOLDER = "temp/";
    /**
     * 文件真实目录
     */
    public static final String FILE_FOLDER = "file/";

    public static final Object TS_NAME = "index.ts";
    public static final String M3U8_NAME = "index.m3u8";


    /******************* session相关 ********************/

    /**
     * 验证码类型：登录注册
     */
    public static final String SESSION_CAPTCHA_CODE_CHECK = "session_captcha_code_check";

    /**
     * 验证码类型：发送邮箱验证码
     */
    public static final String SESSION_CAPTCHA_CODE_EMAIL = "session_captcha_code_email";

    /**
     * session登录用户
     */
    public static final String SESSION_LOGIN_USER = "session_login_user";

    /**
     * session文件分享
     */
    public static final String SESSION_SHARE = "session_share_";


    /******************* redis key相关 ********************/

    /**
     * 过期时间 1分钟
     */
    public static final Integer REDIS_KEY_EXPIRES_ONE_MIN = 60;

    /**
     * 过期时间 5分钟
     */
    public static final Integer REDIS_KEY_EXPIRES_FIVE_MIN = REDIS_KEY_EXPIRES_ONE_MIN * 5;

    /**
     * 过期时间 1小时
     */
    public static final Integer REDIS_KEY_EXPIRES_ONE_HOUR = REDIS_KEY_EXPIRES_ONE_MIN * 60;

    /**
     * 过期时间 1天
     */
    public static final Integer REDIS_KEY_EXPIRES_DAY = REDIS_KEY_EXPIRES_ONE_MIN * 60 * 24;

    /**
     * 系统设置
     */
    public static final String REDIS_KEY_SYSTEM_SETTINGS = "netdisk:system_settings";

    /**
     * 用户网盘空间
     */
    public static final String REDIS_KEY_USER_SPACE = "netdisk:user_space:";

    /**
     * 用户临时文件大小
     */
    public static final String REDIS_KEY_USER_FILE_TEMP_SIZE = "netdisk:user_file_temp_size:";

    /**
     * 下载码
     */
    public static final String REDIS_KEY_DOWNLOAD_CODE = "netdisk:download_code:";

}
